mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-09-19 18:16:25 +00:00
add seaf_mq_manager_ prefix
This commit is contained in:
@@ -320,7 +320,7 @@ publish_repo_update_event (const char *repo_id, const char *commit_id)
|
|||||||
snprintf (buf, sizeof(buf), "repo-update\t%s\t%s",
|
snprintf (buf, sizeof(buf), "repo-update\t%s\t%s",
|
||||||
repo_id, commit_id);
|
repo_id, commit_id);
|
||||||
|
|
||||||
publish_event (seaf->mq_mgr, SEAFILE_SERVER_CHANNEL_EVENT, buf);
|
seaf_mq_manager_publish_event (seaf->mq_mgr, SEAFILE_SERVER_CHANNEL_EVENT, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -32,7 +32,7 @@ seaf_mq_manager_channel_new (SeafMqManager *mgr, const char *channel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
publish_event (SeafMqManager *mgr, const char *channel, const char *content)
|
seaf_mq_manager_publish_event (SeafMqManager *mgr, const char *channel, const char *content)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ publish_event (SeafMqManager *mgr, const char *channel, const char *content)
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
pop_event (SeafMqManager *mgr, const char *channel)
|
seaf_mq_manager_pop_event (SeafMqManager *mgr, const char *channel)
|
||||||
{
|
{
|
||||||
GAsyncQueue *async_queue = g_hash_table_lookup (mgr->priv->chans, channel);
|
GAsyncQueue *async_queue = g_hash_table_lookup (mgr->priv->chans, channel);
|
||||||
if (!async_queue) {
|
if (!async_queue) {
|
||||||
|
@@ -14,9 +14,9 @@ SeafMqManager *
|
|||||||
seaf_mq_manager_new ();
|
seaf_mq_manager_new ();
|
||||||
|
|
||||||
int
|
int
|
||||||
publish_event (SeafMqManager *mgr, const char *channel, const char *content);
|
seaf_mq_manager_publish_event (SeafMqManager *mgr, const char *channel, const char *content);
|
||||||
|
|
||||||
char *
|
char *
|
||||||
pop_event (SeafMqManager *mgr, const char *channel);
|
seaf_mq_manager_pop_event (SeafMqManager *mgr, const char *channel);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -245,7 +245,7 @@ seafile_publish_event(const char *channel, const char *content, GError **error)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = publish_event (seaf->mq_mgr, channel, content);
|
ret = seaf_mq_manager_publish_event (seaf->mq_mgr, channel, content);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -257,7 +257,7 @@ seafile_pop_event(const char *channel, GError **error)
|
|||||||
g_set_error (error, SEAFILE_DOMAIN, SEAF_ERR_BAD_ARGS, "Argument should not be null");
|
g_set_error (error, SEAFILE_DOMAIN, SEAF_ERR_BAD_ARGS, "Argument should not be null");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return pop_event (seaf->mq_mgr, channel);
|
return seaf_mq_manager_pop_event (seaf->mq_mgr, channel);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -531,7 +531,7 @@ publish_repo_event (RepoEventData *rdata)
|
|||||||
rdata->client_name ? rdata->client_name : "",
|
rdata->client_name ? rdata->client_name : "",
|
||||||
rdata->repo_id, rdata->path ? rdata->path : "/");
|
rdata->repo_id, rdata->path ? rdata->path : "/");
|
||||||
|
|
||||||
publish_event (seaf->mq_mgr, SEAFILE_SERVER_CHANNEL_EVENT, buf->str);
|
seaf_mq_manager_publish_event (seaf->mq_mgr, SEAFILE_SERVER_CHANNEL_EVENT, buf->str);
|
||||||
|
|
||||||
g_string_free (buf, TRUE);
|
g_string_free (buf, TRUE);
|
||||||
}
|
}
|
||||||
@@ -544,7 +544,7 @@ publish_stats_event (StatsEventData *rdata)
|
|||||||
rdata->etype, rdata->user,
|
rdata->etype, rdata->user,
|
||||||
rdata->repo_id, rdata->bytes);
|
rdata->repo_id, rdata->bytes);
|
||||||
|
|
||||||
publish_event (seaf->mq_mgr, SEAFILE_SERVER_CHANNEL_STATS, buf->str);
|
seaf_mq_manager_publish_event (seaf->mq_mgr, SEAFILE_SERVER_CHANNEL_STATS, buf->str);
|
||||||
|
|
||||||
g_string_free (buf, TRUE);
|
g_string_free (buf, TRUE);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user