diff options
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c index aea353b..5cc059d 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -1066,7 +1066,7 @@ int send_email(char *msg) | |||
| 1066 | 1066 | ||
| 1067 | 1067 | ||
| 1068 | void process_user_queue_item(snac *snac, xs_dict *q_item) | 1068 | void process_user_queue_item(snac *snac, xs_dict *q_item) |
| 1069 | /* processes an item from the queue */ | 1069 | /* processes an item from the user queue */ |
| 1070 | { | 1070 | { |
| 1071 | char *type; | 1071 | char *type; |
| 1072 | int queue_retry_max = xs_number_get(xs_dict_get(srv_config, "queue_retry_max")); | 1072 | int queue_retry_max = xs_number_get(xs_dict_get(srv_config, "queue_retry_max")); |
| @@ -1172,7 +1172,7 @@ void process_user_queue(snac *snac) | |||
| 1172 | xs *q_item = dequeue(fn); | 1172 | xs *q_item = dequeue(fn); |
| 1173 | 1173 | ||
| 1174 | if (q_item == NULL) { | 1174 | if (q_item == NULL) { |
| 1175 | snac_log(snac, xs_fmt("process_queue q_item error")); | 1175 | snac_log(snac, xs_fmt("process_user_queue q_item error")); |
| 1176 | continue; | 1176 | continue; |
| 1177 | } | 1177 | } |
| 1178 | 1178 | ||
| @@ -1181,6 +1181,33 @@ void process_user_queue(snac *snac) | |||
| 1181 | } | 1181 | } |
| 1182 | 1182 | ||
| 1183 | 1183 | ||
| 1184 | void process_queue_item(xs_dict *q_item) | ||
| 1185 | /* processes an item from the global queue */ | ||
| 1186 | { | ||
| 1187 | } | ||
| 1188 | |||
| 1189 | |||
| 1190 | void process_queue(void) | ||
| 1191 | /* processes the global queue */ | ||
| 1192 | { | ||
| 1193 | xs *list = queue(); | ||
| 1194 | |||
| 1195 | xs_list *p = list; | ||
| 1196 | xs_str *fn; | ||
| 1197 | |||
| 1198 | while (xs_list_iter(&p, &fn)) { | ||
| 1199 | xs *q_item = dequeue(fn); | ||
| 1200 | |||
| 1201 | if (q_item == NULL) { | ||
| 1202 | srv_log(xs_fmt("process_queue q_item error")); | ||
| 1203 | continue; | ||
| 1204 | } | ||
| 1205 | |||
| 1206 | process_queue_item(q_item); | ||
| 1207 | } | ||
| 1208 | } | ||
| 1209 | |||
| 1210 | |||
| 1184 | /** HTTP handlers */ | 1211 | /** HTTP handlers */ |
| 1185 | 1212 | ||
| 1186 | int activitypub_get_handler(d_char *req, char *q_path, | 1213 | int activitypub_get_handler(d_char *req, char *q_path, |