Skip to content

Commit

Permalink
Move replicator #job record to couch_replicator.hrl
Browse files Browse the repository at this point in the history
This is needed to prepare for the Fair Share scheduler feature since
both the scheduler and the fair share module will end up referencing
the #job record.
  • Loading branch information
nickva committed Feb 16, 2021
1 parent dd0c3af commit 183f6fe
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
16 changes: 16 additions & 0 deletions src/couch_replicator/src/couch_replicator.hrl
Expand Up @@ -41,3 +41,19 @@
wref :: reference(),
result :: rep_start_result()
}).


-type job_id() :: term().
-type job_args() :: term().
-type event_type() :: added | started | stopped | {crashed, any()}.
-type event() :: {Type:: event_type(), When :: erlang:timestamp()}.
-type history() :: nonempty_list(event()).


-record(job, {
id :: job_id() | '$1' | '_',
rep :: #rep{} | '_',
pid :: undefined | pid() | '$1' | '_',
monitor :: undefined | reference() | '_',
history :: history() | '_'
}).
15 changes: 0 additions & 15 deletions src/couch_replicator/src/couch_replicator_scheduler.hrl

This file was deleted.

Expand Up @@ -30,7 +30,6 @@

-include_lib("couch/include/couch_db.hrl").
-include_lib("couch_replicator/include/couch_replicator_api_wrap.hrl").
-include("couch_replicator_scheduler.hrl").
-include("couch_replicator.hrl").

-import(couch_util, [
Expand Down

0 comments on commit 183f6fe

Please sign in to comment.