mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
force a feed refresh when someone subscribes
This commit is contained in:
@@ -69,7 +69,16 @@ public class FeedRefreshWorker {
|
||||
}
|
||||
return new AsyncResult<Void>(null);
|
||||
}
|
||||
|
||||
|
||||
@Asynchronous
|
||||
public void updateAsync(Feed feed){
|
||||
try {
|
||||
update(feed);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
private void update(Feed feed) throws NotSupportedException,
|
||||
SystemException, SecurityException, IllegalStateException,
|
||||
RollbackException, HeuristicMixedException,
|
||||
|
||||
@@ -37,7 +37,7 @@ public class FeedSubscriptionService {
|
||||
FeedSubscriptionDAO feedSubscriptionDAO;
|
||||
|
||||
@Lock(LockType.WRITE)
|
||||
public void subscribe(User user, String url, String title,
|
||||
public Feed subscribe(User user, String url, String title,
|
||||
FeedCategory category) {
|
||||
|
||||
Feed feed = feedDAO.findByUrl(url);
|
||||
@@ -72,5 +72,6 @@ public class FeedSubscriptionService {
|
||||
}
|
||||
feedEntryStatusDAO.save(statuses);
|
||||
}
|
||||
return feed;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user