Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update to use UpdaterClient
  • Loading branch information
cccs-rs committed Feb 19, 2024
2 parents 90fb376 + 0db728b commit 3cb073d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions api_vector/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from assemblyline.common import forge
from assemblyline.common.path import strip_path_inclusion
from assemblyline_client.v4_client.client import Client as Client4
from assemblyline_v4_service.updater.updater import ServiceUpdater, UpdateSource

classification = forge.get_classification()
Expand All @@ -13,7 +12,7 @@ class APIVectorUpdateServer(ServiceUpdater):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

def import_update(self, files_sha256: str, al_client: Client4, source: str, default_classification: str = None):
def import_update(self, files_sha256: str, source: str, default_classification: str = None):
if len(files_sha256) != 1:
# No file were found in the latest source update
source_config: UpdateSource = [x for x in self._service.update_config.sources if x["name"] == source][0]
Expand Down
4 changes: 4 additions & 0 deletions service_manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ disable_cache: false
enabled: true
is_external: false
licence_count: 0
privileged: true

config:
min_confidence: 50
Expand All @@ -34,6 +35,9 @@ dependencies:
command: ["python", "-m", "api_vector.updater"]
image: ${REGISTRY}cccs/assemblyline-service-apivector:$SERVICE_TAG
ports: ["5003"]
environment:
- name: MAX_REQUESTS
value: 0
run_as_core: True

update_config:
Expand Down

0 comments on commit 3cb073d

Please sign in to comment.