diff options
author | Nick Vatamaniuc <vatamane@apache.org> | 2021-02-15 22:31:46 -0500 |
---|---|---|
committer | Nick Vatamaniuc <nickva@users.noreply.github.com> | 2021-03-11 13:13:03 -0500 |
commit | 04e1d64f5f7f951a0dcda399354fbd8cfa934181 (patch) | |
tree | 1fb934cf632c1dd9ac367986a633c4557290dc34 | |
parent | b7392540c7ec66ac9e5c386835a6443f9e19b0b9 (diff) | |
download | couchdb-04e1d64f5f7f951a0dcda399354fbd8cfa934181.tar.gz |
Move replicator #job record to couch_replicator.hrl
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.
-rw-r--r-- | src/couch_replicator/src/couch_replicator.hrl | 16 | ||||
-rw-r--r-- | src/couch_replicator/src/couch_replicator_scheduler.hrl | 15 | ||||
-rw-r--r-- | src/couch_replicator/src/couch_replicator_scheduler_job.erl | 1 |
3 files changed, 16 insertions, 16 deletions
diff --git a/src/couch_replicator/src/couch_replicator.hrl b/src/couch_replicator/src/couch_replicator.hrl index 2a5b7c8c8..7c39c7c95 100644 --- a/src/couch_replicator/src/couch_replicator.hrl +++ b/src/couch_replicator/src/couch_replicator.hrl @@ -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() | '_' +}). diff --git a/src/couch_replicator/src/couch_replicator_scheduler.hrl b/src/couch_replicator/src/couch_replicator_scheduler.hrl deleted file mode 100644 index 5203b0caa..000000000 --- a/src/couch_replicator/src/couch_replicator_scheduler.hrl +++ /dev/null @@ -1,15 +0,0 @@ -% Licensed under the Apache License, Version 2.0 (the "License"); you may not -% use this file except in compliance with the License. You may obtain a copy of -% the License at -% -% http://www.apache.org/licenses/LICENSE-2.0 -% -% Unless required by applicable law or agreed to in writing, software -% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -% License for the specific language governing permissions and limitations under -% the License. - - --type job_id() :: term(). --type job_args() :: term(). diff --git a/src/couch_replicator/src/couch_replicator_scheduler_job.erl b/src/couch_replicator/src/couch_replicator_scheduler_job.erl index 0b33419e1..238c725e4 100644 --- a/src/couch_replicator/src/couch_replicator_scheduler_job.erl +++ b/src/couch_replicator/src/couch_replicator_scheduler_job.erl @@ -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, [ |