ocrd 3.11.0__py3-none-any.whl → 3.12.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ocrd/cli/workspace.py CHANGED
@@ -6,7 +6,7 @@ OCR-D CLI: workspace management
6
6
  :nested: full
7
7
  """
8
8
  from os import rmdir, unlink
9
- from os.path import dirname, relpath, normpath, exists, join, isabs, isdir
9
+ from os.path import abspath, dirname, relpath, normpath, exists, join, isabs, isdir
10
10
  from pathlib import Path
11
11
  from json import loads, dumps
12
12
  import sys
@@ -47,7 +47,7 @@ class WorkspaceCtx():
47
47
  def workspace(self):
48
48
  return Workspace(
49
49
  self.resolver,
50
- directory=self.directory,
50
+ self.directory,
51
51
  mets_basename=self.mets_basename,
52
52
  automatic_backup=self.automatic_backup,
53
53
  mets_server_url=self.mets_server_url,
@@ -85,7 +85,7 @@ def workspace_cli(ctx, directory, mets, mets_basename, mets_server_url, backup):
85
85
  initLogging()
86
86
  ctx.obj = WorkspaceCtx(
87
87
  directory,
88
- mets_url=mets,
88
+ mets,
89
89
  mets_basename=mets_basename,
90
90
  mets_server_url=mets_server_url,
91
91
  automatic_backup=backup
@@ -254,22 +254,26 @@ def workspace_add_file(ctx, file_grp, file_id, mimetype, page_id, ignore, check_
254
254
  log.debug("Adding '%s'", fname)
255
255
  local_filename = None
256
256
  if not (fname.startswith('http://') or fname.startswith('https://')):
257
- if not fname.startswith(ctx.directory):
258
- if not isabs(fname) and exists(join(ctx.directory, fname)):
257
+ assert isabs(ctx.directory)
258
+ # try to resolve relative to workspace or CWD
259
+ if not isabs(fname):
260
+ if exists(join(ctx.directory, fname)):
259
261
  fname = join(ctx.directory, fname)
260
262
  else:
261
- log.debug("File '%s' is not in workspace, copying", fname)
262
- try:
263
- fname = ctx.resolver.download_to_directory(ctx.directory, fname, subdir=file_grp)
264
- except FileNotFoundError:
265
- if check_file_exists:
266
- log.error("File '%s' does not exist, halt execution!" % fname)
267
- sys.exit(1)
268
- if check_file_exists and not exists(fname):
269
- log.error("File '%s' does not exist, halt execution!" % fname)
270
- sys.exit(1)
263
+ fname = abspath(fname)
271
264
  if fname.startswith(ctx.directory):
265
+ if check_file_exists and not exists(fname):
266
+ log.error("File '%s' does not exist, halt execution!" % fname)
267
+ sys.exit(1)
272
268
  fname = relpath(fname, ctx.directory)
269
+ else:
270
+ log.debug("File '%s' is not in workspace, copying", fname)
271
+ try:
272
+ fname = ctx.resolver.download_to_directory(ctx.directory, fname, subdir=file_grp)
273
+ except FileNotFoundError:
274
+ if check_file_exists:
275
+ log.error("File '%s' does not exist, halt execution!" % fname)
276
+ sys.exit(1)
273
277
  local_filename = fname
274
278
 
275
279
  if not page_id:
@@ -299,8 +303,8 @@ def workspace_add_file(ctx, file_grp, file_id, mimetype, page_id, ignore, check_
299
303
  @click.option('-g', '--page-id', help="physical page ID of the file", required=False)
300
304
  @click.option('-i', '--file-id', help="ID of the file. If not provided, derive from fileGrp and filename", required=False)
301
305
  @click.option('-u', '--url', help="Remote URL of the file", required=False)
302
- @click.option('-l', '--local-filename', help="Local filesystem path in the workspace directory "
303
- "(copied from source file if different)", required=False)
306
+ @click.option('-l', '--local-filename', help="Relative filesystem path in the workspace directory "
307
+ "(copied from source path if different)", required=False)
304
308
  @click.option('-G', '--file-grp', help="File group USE of the file", required=True)
305
309
  @click.option('-n', '--dry-run', help="Don't actually do anything to the METS or filesystem, just preview",
306
310
  default=False, is_flag=True)
@@ -414,38 +418,45 @@ def workspace_cli_bulk_add(ctx, regex, mimetype, page_id, file_id, url, local_fi
414
418
  raise ValueError(f"OcrdFile attribute '{param_name}' unset ({file_dict})")
415
419
  for group_name in group_dict:
416
420
  file_dict[param_name] = file_dict[param_name].replace('{{ %s }}' % group_name, group_dict[group_name])
421
+ if '{{ ' in file_dict[param_name]:
422
+ log.warning("Probably failed to match a capture group in %s: '%s'", param_name, file_dict[param_name])
417
423
 
418
424
  # Where to copy from
419
425
  if src_path_option:
420
- src_path = src_path_option
421
426
  for group_name in group_dict:
422
- src_path = src_path.replace('{{ %s }}' % group_name, group_dict[group_name])
423
- srcpath = Path(src_path)
427
+ src_path_option = src_path_option.replace('{{ %s }}' % group_name, group_dict[group_name])
428
+ if '{{ ' in src_path_option:
429
+ log.warning("Probably failed to match a capture group in source path: '%s'", src_path_option)
430
+ src_path = Path(src_path_option)
424
431
  else:
425
- srcpath = file_path
432
+ src_path = file_path
426
433
 
427
434
  # derive --file-id from filename if not --file-id not explicitly set
428
435
  if not file_id:
429
- id_field = srcpath.stem if file_path != srcpath else file_path.stem
436
+ id_field = src_path.stem if file_path != src_path else file_path.stem
430
437
  file_dict['file_id'] = safe_filename('%s_%s' % (file_dict['file_grp'], id_field))
431
438
  if not mimetype:
432
439
  try:
433
- file_dict['mimetype'] = EXT_TO_MIME[srcpath.suffix]
440
+ file_dict['mimetype'] = EXT_TO_MIME[src_path.suffix]
434
441
  except KeyError:
435
442
  log.error("Cannot guess MIME type from extension '%s' for '%s'. "
436
- "Set --mimetype explicitly" % (srcpath.suffix, srcpath))
443
+ "Set --mimetype explicitly" % (src_path.suffix, src_path))
437
444
 
438
445
  # copy files if src != url
446
+ src_path = src_path.resolve().absolute()
439
447
  if local_filename_is_src:
440
- file_dict['local_filename'] = srcpath
441
- else:
442
- destpath = Path(workspace.directory, file_dict['local_filename'])
443
- if srcpath != destpath and not destpath.exists():
444
- log.info("cp '%s' '%s'", srcpath, destpath)
445
- if not dry_run:
446
- if not destpath.parent.is_dir():
447
- destpath.parent.mkdir()
448
- destpath.write_bytes(srcpath.read_bytes())
448
+ if str(src_path).startswith(workspace.directory):
449
+ file_dict['local_filename'] = src_path.relative_to(workspace.directory)
450
+ else:
451
+ file_dict['local_filename'] = src_path.name # will be copied-in below
452
+
453
+ dest_path = Path(workspace.directory, file_dict['local_filename'])
454
+ if src_path != dest_path and not dest_path.exists():
455
+ log.info("cp '%s' '%s'", src_path, dest_path)
456
+ if not dry_run:
457
+ if not dest_path.parent.is_dir():
458
+ dest_path.parent.mkdir()
459
+ dest_path.write_bytes(src_path.read_bytes())
449
460
 
450
461
  # Add to workspace (or not)
451
462
  fileGrp = file_dict.pop('file_grp')
@@ -465,8 +476,7 @@ def workspace_cli_bulk_add(ctx, regex, mimetype, page_id, file_id, url, local_fi
465
476
  @workspace_cli.command('find')
466
477
  @mets_find_options
467
478
  @click.option('-k', '--output-field', help="Output field. Repeat for multiple fields, will be joined with tab",
468
- default=['local_filename'],
469
- show_default=True,
479
+ default=['local_filename'], show_default=True,
470
480
  multiple=True,
471
481
  type=click.Choice([
472
482
  'url',
@@ -869,7 +879,7 @@ def merge(ctx, overwrite, force, copy_files, filegrp_mapping, fileid_mapping, pa
869
879
  the same semantics as in ``ocrd workspace find``, see ``ocrd workspace find --help``
870
880
  for an explanation.
871
881
  """
872
- mets_path = Path(mets_path)
882
+ mets_path = Path(mets_path).absolute()
873
883
  if filegrp_mapping:
874
884
  filegrp_mapping = loads(filegrp_mapping)
875
885
  assert not ctx.mets_server_url, \
ocrd/mets_server.py CHANGED
@@ -418,7 +418,8 @@ class OcrdMetsServer:
418
418
  def create_process(mets_server_url: str, ws_dir_path: str, log_file: str) -> int:
419
419
  sub_process = Popen(
420
420
  args=["ocrd", "workspace", "-U", f"{mets_server_url}", "-d", f"{ws_dir_path}", "server", "start"],
421
- stdout=open(file=log_file, mode="w"), stderr=open(file=log_file, mode="a"), cwd=ws_dir_path,
421
+ stdout=open(file=log_file, mode="w"), stderr=open(file=log_file, mode="a"),
422
+ #cwd=ws_dir_path, # rs: if relative, this will cause wrong path resolution in the subprocess
422
423
  shell=False, universal_newlines=True, start_new_session=True
423
424
  )
424
425
  # Wait for the mets server to start
@@ -446,7 +447,7 @@ class OcrdMetsServer:
446
447
  Path(self.url).unlink()
447
448
 
448
449
  def startup(self):
449
- self.log.info("Configuring the METS Server")
450
+ self.log.info("Configuring the METS Server for %s", self.workspace)
450
451
 
451
452
  workspace = self.workspace
452
453
 
ocrd/processor/base.py CHANGED
@@ -539,7 +539,7 @@ class Processor():
539
539
  self._base_logger.info("limiting page timeout from %d to %d sec", max_seconds, self.max_page_seconds)
540
540
  max_seconds = self.max_page_seconds
541
541
 
542
- if isinstance(workspace.mets, ClientSideOcrdMets):
542
+ if max_workers > 1:
543
543
  executor_cls = ProcessPoolExecutor
544
544
  log_queue = mp.get_context('fork').Queue()
545
545
  else:
@@ -553,7 +553,7 @@ class Processor():
553
553
  initializer=_page_worker_set_ctxt,
554
554
  initargs=(self, log_queue),
555
555
  )
556
- if isinstance(workspace.mets, ClientSideOcrdMets):
556
+ if max_workers > 1:
557
557
  assert executor.active # ensure pre-forking
558
558
  # forward messages from log queue (in subprocesses) to all root handlers
559
559
  log_listener = logging.handlers.QueueListener(log_queue, *logging.root.handlers,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ocrd
3
- Version: 3.11.0
3
+ Version: 3.12.1
4
4
  Summary: OCR-D framework
5
5
  Author-email: Konstantin Baierer <unixprog@gmail.com>
6
6
  License: Apache License 2.0
@@ -1,6 +1,6 @@
1
1
  ocrd/__init__.py,sha256=ZswMVmlqFhAEIzMR3my6IKPq9XLH21aDPC_m_8Jh4dA,1076
2
2
  ocrd/constants.py,sha256=REPY-y28MMsrTWBNB4oOsvX3W06Xr2fvtv9wuWH9oAI,633
3
- ocrd/mets_server.py,sha256=LbZ0U2_o0W7cWO639U7E816dXabro8-8yHGX0quvHn4,22304
3
+ ocrd/mets_server.py,sha256=No9UJnD14etKrfGaH_ZKgeaMR2-mPAD1mOJ1j8lwzlU,22415
4
4
  ocrd/ocrd-all-tool.json,sha256=qVTZq8cJtKQuEgtqYQVkpYQPz4BegO09b7TT-LcfsJs,3134
5
5
  ocrd/resolver.py,sha256=7uwHRxaK8YMdKHe_a2dfrcNwL6UhQRJRVBrIX7GST7Q,15443
6
6
  ocrd/resource_manager.py,sha256=2wo3JSCYE1oA0VgI8H901IsC-fnx6vRJ5qSMFgYNorE,20664
@@ -15,7 +15,7 @@ ocrd/cli/ocrd_tool.py,sha256=kB3Y3tj7Fpz6Ts4KgVlznhXpAx8gCDvJTnO39j8SGL4,7679
15
15
  ocrd/cli/process.py,sha256=yfhBSYmuY5k2AccKwiNvG9hCDx1coYyWjq9BBwYaL3Y,1234
16
16
  ocrd/cli/resmgr.py,sha256=7hRRi8EryQwakRdZgguee3ercA5_T48BKGWWfgAVfzM,8072
17
17
  ocrd/cli/validate.py,sha256=P8jrzAnoU-5TUjLNA7s_ZMY2Krw5Y-SVIZPhdOk25cw,5931
18
- ocrd/cli/workspace.py,sha256=0UzKN7vvD0n5wwxldzLHOlikDDIyiBiV1PuTOKCnnnE,41279
18
+ ocrd/cli/workspace.py,sha256=_QPRyDW0F8SPM8ClHNmtzOou_bHD9XzZleB89cI7-e0,41884
19
19
  ocrd/cli/zip.py,sha256=3HMUbVsPTK3SRuF5oZnCZLjoqXJK-AYpA-rMqenY858,5965
20
20
  ocrd/decorators/__init__.py,sha256=gU7WDp2re8BF8DU4PVRRqgQpp7TR5wMOnoafcbMAjws,6324
21
21
  ocrd/decorators/loglevel_option.py,sha256=QHVZ_72rkt2hqGSP9vuIXUYo5YhBxLsldUsaVVpb_YY,802
@@ -23,7 +23,7 @@ ocrd/decorators/mets_find_options.py,sha256=8fiSdk-415o6-iBPB2T9He_v52qE8cTj3cCn
23
23
  ocrd/decorators/ocrd_cli_options.py,sha256=Bemkq3V3QkOI3nNqGzphaNW7gjU9vNN-M5F2DvxvioM,2479
24
24
  ocrd/decorators/parameter_option.py,sha256=TnCIcV9L5oAnI1Ew2TyFzo5FAwiIzWl2pn8oaD9jfEU,1056
25
25
  ocrd/processor/__init__.py,sha256=39ymNwYRdc-b_OJzzKmWCvo2ga3KdsGSYDHE1Hzkn_w,274
26
- ocrd/processor/base.py,sha256=0SbFhLYUC8VMPZdCd_Y329514IuOz1X1jrCbuuX8Kwg,62074
26
+ ocrd/processor/base.py,sha256=oTrQAEJtbIqNwS9xk7qGuwcYdh9hy5MFMsNk98if4og,62012
27
27
  ocrd/processor/helpers.py,sha256=4lR_QvZsxvh7f8_uK9YzdHP5-hvFU4qqYM_Cu_k41KI,10937
28
28
  ocrd/processor/ocrd_page_result.py,sha256=hHV1TlKhKFN848cUCqR31v2R3HH4HEoeyGXqUc2DLkY,2945
29
29
  ocrd/processor/builtin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -38,7 +38,7 @@ ocrd/processor/builtin/param_command_transkribus-to-prima.json,sha256=AvPNNS5uBm
38
38
  ocrd/processor/builtin/shell_processor.py,sha256=000qP9wGfoJWtovFXaNYaDfKw_9VNEg7keulYoe0GyM,5943
39
39
  ocrd/processor/builtin/dummy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  ocrd/processor/builtin/dummy/ocrd-tool.json,sha256=t_M3HABw7k_Ufi1L9Mr4t3LSCRnu0HH8-fvEs3u2PQY,3487
41
- ocrd-3.11.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
41
+ ocrd-3.12.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
42
42
  ocrd_modelfactory/__init__.py,sha256=sjAwPwDzetvPHdV6nPquHtMdFUBYRmo1P-VKER9YCWM,4404
43
43
  ocrd_models/__init__.py,sha256=A0aj0mOraNb-xfiUueACdoaqISnp0qH-F49nTJg2vCs,380
44
44
  ocrd_models/constants.py,sha256=R7-jOGabFd8HP0qRWfTMk0RcUmdwN-jhmDVbUW_QfU4,6961
@@ -56,12 +56,12 @@ ocrd_models/xpath_functions.py,sha256=VM2f9hl8ja4NrDOEQRSYdx7GewwAxfoyGMDjqjgA_7
56
56
  ocrd_network/__init__.py,sha256=NWlSgXi7z45ow37AmITxfCB1d-L39rO8ttyxNJ-z8G0,376
57
57
  ocrd_network/client.py,sha256=hi13uDUYC5t7xHtZEUYwNBAZOvovWaScfCtFSORVg7Q,3224
58
58
  ocrd_network/client_utils.py,sha256=d5UE0MdDJxsYxIQemKcoUuALOiPJ8Cew8bjgsg9d71w,5709
59
- ocrd_network/constants.py,sha256=mUjpkZDYPdRZmOeC0jyzQkuLuWrODLFzlrAHkguKWGg,1942
59
+ ocrd_network/constants.py,sha256=lre5j0JAHAzZQMWPOJnVnSG79KIT5RmEtJ9PmHUNR-c,1771
60
60
  ocrd_network/database.py,sha256=p2vaFgVzhA1l8CTY9vTMT6mOjzHSJK1tE1dkPrUUcp8,10670
61
61
  ocrd_network/logging_utils.py,sha256=hXwS46FzY_HTh92DgnxTuARxj8C18bOBmFKVrvBlUgc,2409
62
62
  ocrd_network/param_validators.py,sha256=Jl1VwiPPKJ50k-xEHLdvW-1QDOkJHCiMz4k9Ipqm-Uc,1489
63
63
  ocrd_network/process_helpers.py,sha256=t2qltUpRefzLwdSGsiUEOGYO4Pz2OH7arpgjmCAeXMU,3086
64
- ocrd_network/processing_server.py,sha256=z21DvRleEeo0hkpc1-2z0jLKuf5WSipL95MVEns8eJE,38457
64
+ ocrd_network/processing_server.py,sha256=vHKDW_ZPVzCJpC34nnO7_L8zeRq7kH1eO_DqpPfmKEw,38453
65
65
  ocrd_network/processing_worker.py,sha256=5AtvIhfcePzltKj4SElh7Aj9zlUOEiMVPTjtXuFSbT8,12659
66
66
  ocrd_network/resource_manager_server.py,sha256=Ihz2g9uhkPSJee9GL7485DFC4cORhro4JQI6QzHoUA4,7255
67
67
  ocrd_network/server_cache.py,sha256=orfAMw3LwUnduRHFAB6MpfoORTDoPV4ntSdAcQHBOyI,13148
@@ -91,7 +91,7 @@ ocrd_network/runtime_data/connection_clients.py,sha256=HKf_aSfwg11JeH6qiQXnqxbnv
91
91
  ocrd_network/runtime_data/deployer.py,sha256=j3tcauURZtu7MKcEIE9B5eMCMSYMbxhB8LmtK72Zk1c,5314
92
92
  ocrd_network/runtime_data/hosts.py,sha256=P1bLh1NjgL-ajgP-VhGCACvy6rgJ5nZhGKsHaldzatk,8921
93
93
  ocrd_network/runtime_data/network_agents.py,sha256=wwN7IJei4UdlyfhjvdmB5TB4O0Gn8icSkArJe-suvAY,4523
94
- ocrd_network/runtime_data/network_services.py,sha256=5aH3RNGCi1fBuSdRp_Xz0MzyD_FmnvPnaBYAiYY3gp4,7891
94
+ ocrd_network/runtime_data/network_services.py,sha256=HDEs2ZAtZEQFEnWUWa2UP5l3IH0ek19PWmtSEObzC-8,7706
95
95
  ocrd_utils/__init__.py,sha256=Cl_lrZxjXuTZ_me4I_lpaFNTpSdacWhQetOtHdrkUsU,6057
96
96
  ocrd_utils/config.py,sha256=Oe8JBGb8r4z274XNWcdMV-GApzxmAYO8hHmbAV5bXf8,12609
97
97
  ocrd_utils/constants.py,sha256=6lqMLeJdkFBlvGVmGjcExWbRKzNU6QT0kADBb5BkcBc,3464
@@ -124,8 +124,8 @@ ocrd_validators/xlink.xsd,sha256=8fW7YAMWXN2PbB_MMvj9H5ZeFoEBDzuYBtlGC8_6ijw,318
124
124
  ocrd_validators/xsd_mets_validator.py,sha256=YgiuNtwNDtn3LuvdFFscnmsGREF_wQ4wtA76yE2Iljw,469
125
125
  ocrd_validators/xsd_page_validator.py,sha256=ggt-nmaz-DDyAPwm3ZMVvtChuV2BJ2ZEEbWpePL9vTk,469
126
126
  ocrd_validators/xsd_validator.py,sha256=ahJo_oVvTK_JB0Cu4CkMC8l_gbzsyW91AxGtelMjqrg,2115
127
- ocrd-3.11.0.dist-info/METADATA,sha256=pgkMu0pKPHEcGCCS63Dmxo9fnfWfUI9owWzouzCfECw,11479
128
- ocrd-3.11.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
129
- ocrd-3.11.0.dist-info/entry_points.txt,sha256=CI-NoDR1BYmsuAsJmPAn4NrN9guzdedHGUbC8QSmdGs,266
130
- ocrd-3.11.0.dist-info/top_level.txt,sha256=pUgiN42t4KXC5rvpi6V8atza31XP4SCznXpXlVlvomM,75
131
- ocrd-3.11.0.dist-info/RECORD,,
127
+ ocrd-3.12.1.dist-info/METADATA,sha256=XQvJMEg3Aw7kMcV7go_4BTD32c4M024v4DWffD3-YHo,11479
128
+ ocrd-3.12.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
129
+ ocrd-3.12.1.dist-info/entry_points.txt,sha256=CI-NoDR1BYmsuAsJmPAn4NrN9guzdedHGUbC8QSmdGs,266
130
+ ocrd-3.12.1.dist-info/top_level.txt,sha256=pUgiN42t4KXC5rvpi6V8atza31XP4SCznXpXlVlvomM,75
131
+ ocrd-3.12.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
ocrd_network/constants.py CHANGED
@@ -2,8 +2,6 @@ from enum import Enum
2
2
 
3
3
  DOCKER_IMAGE_MONGO_DB = "mongo"
4
4
  DOCKER_IMAGE_RABBIT_MQ = "rabbitmq:4.2-management"
5
- # These feature flags are required by default to use the newer version
6
- DOCKER_RABBIT_MQ_FEATURES = "quorum_queue,implicit_default_bindings,classic_mirrored_queue_version"
7
5
 
8
6
  NETWORK_PROTOCOLS = ["http://", "https://"]
9
7
  OCRD_ALL_TOOL_JSON = "ocrd-all-tool.json"
@@ -388,7 +388,7 @@ class ProcessingServer(FastAPI):
388
388
  self.cache_processing_requests.update_request_counter(workspace_key=workspace_key, by_value=0)
389
389
 
390
390
  # This check is done to return early in case a workspace_id is provided
391
- # but the abs mets path cannot be queried from the DB
391
+ # but the mets path cannot be queried from the DB
392
392
  request_mets_path = await validate_and_return_mets_path(self.log, data)
393
393
 
394
394
  page_ids = expand_page_ids(data.page_id)
@@ -2,7 +2,7 @@ from __future__ import annotations
2
2
  from logging import Logger
3
3
  from typing import Any, Dict, List, Optional, Union
4
4
 
5
- from ..constants import DOCKER_IMAGE_MONGO_DB, DOCKER_IMAGE_RABBIT_MQ, DOCKER_RABBIT_MQ_FEATURES
5
+ from ..constants import DOCKER_IMAGE_MONGO_DB, DOCKER_IMAGE_RABBIT_MQ
6
6
  from ..database import verify_mongodb_available
7
7
  from ..rabbitmq_utils import verify_rabbitmq_available
8
8
  from .connection_clients import create_docker_client
@@ -136,9 +136,7 @@ class DataRabbitMQ(DataNetworkService):
136
136
  env = [
137
137
  # The default credentials to be used by the processing workers
138
138
  f"RABBITMQ_DEFAULT_USER={rmq_user}",
139
- f"RABBITMQ_DEFAULT_PASS={rmq_password}",
140
- # These feature flags are required by default to use the newer version
141
- f"RABBITMQ_FEATURE_FLAGS={DOCKER_RABBIT_MQ_FEATURES}"
139
+ f"RABBITMQ_DEFAULT_PASS={rmq_password}"
142
140
  ]
143
141
  if not ports_mapping:
144
142
  # 5672, 5671 - used by AMQP 0-9-1 and AMQP 1.0 clients without and with TLS