mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 05:15:04 +00:00
Queue actor request renamed to actor_refresh.
This commit is contained in:
parent
f332acc70d
commit
66c42da77a
3 changed files with 9 additions and 9 deletions
|
@ -130,7 +130,7 @@ int actor_request(snac *user, const char *actor, xs_dict **data)
|
|||
if (status == 205) {
|
||||
/* stale actor: use it, but request a refresh */
|
||||
if (!xs_startswith(actor, srv_baseurl))
|
||||
enqueue_actor_request(user, actor);
|
||||
enqueue_actor_refresh(user, actor);
|
||||
}
|
||||
else
|
||||
if (!valid_status(status)) {
|
||||
|
@ -2249,7 +2249,7 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
|
|||
verify_links(snac);
|
||||
}
|
||||
else
|
||||
if (strcmp(type, "actor_request") == 0) {
|
||||
if (strcmp(type, "actor_refresh") == 0) {
|
||||
const char *actor = xs_dict_get(q_item, "actor");
|
||||
double mtime = object_mtime(actor);
|
||||
|
||||
|
@ -2263,7 +2263,7 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
|
|||
else
|
||||
object_touch(actor);
|
||||
|
||||
snac_log(snac, xs_fmt("refresh actor %s %d", actor, status));
|
||||
snac_log(snac, xs_fmt("actor_refresh %s %d", actor, status));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
10
data.c
10
data.c
|
@ -1597,7 +1597,7 @@ int actor_get_refresh(snac *user, const char *actor, xs_dict **data)
|
|||
int status = actor_get(actor, data);
|
||||
|
||||
if (status == 205 && user && !xs_startswith(actor, srv_baseurl))
|
||||
enqueue_actor_request(user, actor);
|
||||
enqueue_actor_refresh(user, actor);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
@ -2459,10 +2459,10 @@ void enqueue_verify_links(snac *user)
|
|||
}
|
||||
|
||||
|
||||
void enqueue_actor_request(snac *user, const char *actor)
|
||||
/* enqueues an actor request */
|
||||
void enqueue_actor_refresh(snac *user, const char *actor)
|
||||
/* enqueues an actor refresh */
|
||||
{
|
||||
xs *qmsg = _new_qmsg("actor_request", "", 0);
|
||||
xs *qmsg = _new_qmsg("actor_refresh", "", 0);
|
||||
char *ntid = xs_dict_get(qmsg, "ntid");
|
||||
xs *fn = xs_fmt("%s/queue/%s.json", user->basedir, ntid);
|
||||
|
||||
|
@ -2470,7 +2470,7 @@ void enqueue_actor_request(snac *user, const char *actor)
|
|||
|
||||
qmsg = _enqueue_put(fn, qmsg);
|
||||
|
||||
snac_debug(user, 1, xs_fmt("enqueue_actor_request %s", user->actor));
|
||||
snac_debug(user, 1, xs_fmt("enqueue_actor_refresh %s", user->actor));
|
||||
}
|
||||
|
||||
|
||||
|
|
2
snac.h
2
snac.h
|
@ -223,7 +223,7 @@ void enqueue_ntfy(const xs_str *msg, const char *ntfy_server, const char *ntfy_t
|
|||
void enqueue_message(snac *snac, const xs_dict *msg);
|
||||
void enqueue_close_question(snac *user, const char *id, int end_secs);
|
||||
void enqueue_verify_links(snac *user);
|
||||
void enqueue_actor_request(snac *user, const char *actor);
|
||||
void enqueue_actor_refresh(snac *user, const char *actor);
|
||||
void enqueue_request_replies(snac *user, const char *id);
|
||||
int was_question_voted(snac *user, const char *id);
|
||||
|
||||
|
|
Loading…
Reference in a new issue