mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-12-15 08:32:48 +00:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e63d0ba7f | ||
|
|
53d766897e | ||
|
|
3751b4158e | ||
|
|
62aeaf31c6 | ||
|
|
7d2b49ba8c | ||
|
|
f73475b204 | ||
|
|
f117f93abc | ||
|
|
4dd8cf285a | ||
|
|
faaee6a7ab | ||
|
|
3eb877787e | ||
|
|
313fbcff3f | ||
|
|
d1aed7c9ea | ||
|
|
1ae2b84dd7 | ||
|
|
0855696f10 | ||
|
|
5c67f4311d | ||
|
|
e3dc76f281 | ||
|
|
644f2ffd9e | ||
|
|
70d784005b | ||
|
|
edf72d3e4f | ||
|
|
355edce635 | ||
|
|
465fec3774 |
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
##### 使用版本
|
##### 使用版本
|
||||||
[请提供你使用的Jumpserver版本 1.x.x 注: 0.3.x不再提供支持]
|
[请提供你使用的JumpServer版本 如 2.0.1 注: 1.4及以下版本不再提供支持]
|
||||||
|
|
||||||
##### 问题复现步骤
|
##### 问题复现步骤
|
||||||
1. [步骤1]
|
1. [步骤1]
|
||||||
|
|||||||
44
.github/release-config.yml
vendored
Normal file
44
.github/release-config.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
name-template: 'v$RESOLVED_VERSION'
|
||||||
|
tag-template: 'v$RESOLVED_VERSION'
|
||||||
|
categories:
|
||||||
|
- title: '🌱 新功能 Features'
|
||||||
|
labels:
|
||||||
|
- 'feature'
|
||||||
|
- 'enhancement'
|
||||||
|
- 'feat'
|
||||||
|
- '新功能'
|
||||||
|
- title: '🚀 性能优化 Optimization'
|
||||||
|
labels:
|
||||||
|
- 'perf'
|
||||||
|
- 'opt'
|
||||||
|
- 'refactor'
|
||||||
|
- 'Optimization'
|
||||||
|
- '优化'
|
||||||
|
- title: '🐛 Bug修复 Bug Fixes'
|
||||||
|
labels:
|
||||||
|
- 'fix'
|
||||||
|
- 'bugfix'
|
||||||
|
- 'bug'
|
||||||
|
- title: '🧰 其它 Maintenance'
|
||||||
|
labels:
|
||||||
|
- 'chore'
|
||||||
|
- 'docs'
|
||||||
|
exclude-labels:
|
||||||
|
- 'no'
|
||||||
|
- '无需处理'
|
||||||
|
- 'wontfix'
|
||||||
|
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
||||||
|
version-resolver:
|
||||||
|
major:
|
||||||
|
labels:
|
||||||
|
- 'major'
|
||||||
|
minor:
|
||||||
|
labels:
|
||||||
|
- 'minor'
|
||||||
|
patch:
|
||||||
|
labels:
|
||||||
|
- 'patch'
|
||||||
|
default: patch
|
||||||
|
template: |
|
||||||
|
## 版本变化 What’s Changed
|
||||||
|
$CHANGES
|
||||||
12
.github/workflows/jms-generic-action-handler.yml
vendored
Normal file
12
.github/workflows/jms-generic-action-handler.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
on: [push, pull_request, release]
|
||||||
|
|
||||||
|
name: JumpServer repos generic handler
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
generic_handler:
|
||||||
|
name: Run generic handler
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: jumpserver/action-generic-handler@master
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }}
|
||||||
46
.github/workflows/release-drafter.yml
vendored
Normal file
46
.github/workflows/release-drafter.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
# Sequence of patterns matched against refs/tags
|
||||||
|
tags:
|
||||||
|
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||||
|
|
||||||
|
name: Create Release And Upload assets
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
create-realese:
|
||||||
|
name: Create Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Get version
|
||||||
|
id: get_version
|
||||||
|
run: |
|
||||||
|
TAG=$(basename ${GITHUB_REF})
|
||||||
|
VERSION=${TAG/v/}
|
||||||
|
echo "::set-output name=TAG::$TAG"
|
||||||
|
echo "::set-output name=VERSION::$VERSION"
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: release-drafter/release-drafter@v5
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
config-name: release-config.yml
|
||||||
|
version: ${{ steps.get_version.outputs.TAG }}
|
||||||
|
tag: ${{ steps.get_version.outputs.TAG }}
|
||||||
|
|
||||||
|
build-and-release:
|
||||||
|
needs: create-realese
|
||||||
|
name: Build and Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Build it and upload
|
||||||
|
uses: jumpserver/action-build-upload-assets@master
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.create-realese.outputs.upload_url }}
|
||||||
11
Dockerfile
11
Dockerfile
@@ -1,15 +1,21 @@
|
|||||||
FROM registry.fit2cloud.com/public/python:v3
|
FROM registry.fit2cloud.com/public/python:v3
|
||||||
MAINTAINER Jumpserver Team <ibuler@qq.com>
|
MAINTAINER Jumpserver Team <ibuler@qq.com>
|
||||||
|
|
||||||
|
ENV LANG=en_US.UTF-8
|
||||||
|
|
||||||
WORKDIR /opt/jumpserver
|
WORKDIR /opt/jumpserver
|
||||||
RUN useradd jumpserver
|
RUN useradd jumpserver
|
||||||
|
|
||||||
COPY ./requirements /tmp/requirements
|
COPY ./requirements /tmp/requirements
|
||||||
|
|
||||||
|
RUN wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo \
|
||||||
|
&& sed -i 's@/centos/@/centos-vault/@g' /etc/yum.repos.d/CentOS-Base.repo \
|
||||||
|
&& sed -i 's@$releasever@6.10@g' /etc/yum.repos.d/CentOS-Base.repo
|
||||||
|
|
||||||
RUN yum -y install epel-release && \
|
RUN yum -y install epel-release && \
|
||||||
echo -e "[mysql]\nname=mysql\nbaseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql57-community-el6/\ngpgcheck=0\nenabled=1" > /etc/yum.repos.d/mysql.repo
|
echo -e "[mysql]\nname=mysql\nbaseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql57-community-el6/\ngpgcheck=0\nenabled=1" > /etc/yum.repos.d/mysql.repo
|
||||||
RUN cd /tmp/requirements && yum -y install $(cat rpm_requirements.txt)
|
RUN cd /tmp/requirements && yum -y install $(cat rpm_requirements.txt)
|
||||||
RUN cd /tmp/requirements && pip install --upgrade pip setuptools && pip install wheel && \
|
RUN cd /tmp/requirements && pip install --upgrade pip setuptools==49.6.0 && pip install wheel && \
|
||||||
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt || pip install -r requirements.txt
|
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt || pip install -r requirements.txt
|
||||||
RUN mkdir -p /root/.ssh/ && echo -e "Host *\n\tStrictHostKeyChecking no\n\tUserKnownHostsFile /dev/null" > /root/.ssh/config
|
RUN mkdir -p /root/.ssh/ && echo -e "Host *\n\tStrictHostKeyChecking no\n\tUserKnownHostsFile /dev/null" > /root/.ssh/config
|
||||||
|
|
||||||
@@ -18,9 +24,6 @@ RUN echo > config.yml
|
|||||||
VOLUME /opt/jumpserver/data
|
VOLUME /opt/jumpserver/data
|
||||||
VOLUME /opt/jumpserver/logs
|
VOLUME /opt/jumpserver/logs
|
||||||
|
|
||||||
ENV LANG=zh_CN.UTF-8
|
|
||||||
ENV LC_ALL=zh_CN.UTF-8
|
|
||||||
|
|
||||||
EXPOSE 8070
|
EXPOSE 8070
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
ENTRYPOINT ["./entrypoint.sh"]
|
ENTRYPOINT ["./entrypoint.sh"]
|
||||||
|
|||||||
18
apps/assets/migrations/0050_auto_20200711_1740.py
Normal file
18
apps/assets/migrations/0050_auto_20200711_1740.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 2.2.10 on 2020-07-11 09:40
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('assets', '0049_systemuser_sftp_root'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='asset',
|
||||||
|
name='created_by',
|
||||||
|
field=models.CharField(blank=True, max_length=128, null=True, verbose_name='Created by'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -221,7 +221,7 @@ class Asset(ProtocolsMixin, NodesRelationMixin, OrgModelMixin):
|
|||||||
hostname_raw = models.CharField(max_length=128, blank=True, null=True, verbose_name=_('Hostname raw'))
|
hostname_raw = models.CharField(max_length=128, blank=True, null=True, verbose_name=_('Hostname raw'))
|
||||||
|
|
||||||
labels = models.ManyToManyField('assets.Label', blank=True, related_name='assets', verbose_name=_("Labels"))
|
labels = models.ManyToManyField('assets.Label', blank=True, related_name='assets', verbose_name=_("Labels"))
|
||||||
created_by = models.CharField(max_length=32, null=True, blank=True, verbose_name=_('Created by'))
|
created_by = models.CharField(max_length=128, null=True, blank=True, verbose_name=_('Created by'))
|
||||||
date_created = models.DateTimeField(auto_now_add=True, null=True, blank=True, verbose_name=_('Date created'))
|
date_created = models.DateTimeField(auto_now_add=True, null=True, blank=True, verbose_name=_('Date created'))
|
||||||
comment = models.TextField(max_length=128, default='', blank=True, verbose_name=_('Comment'))
|
comment = models.TextField(max_length=128, default='', blank=True, verbose_name=_('Comment'))
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
from django.db import models, transaction
|
from django.db import models, transaction
|
||||||
from django.db.models import Max
|
from django.db.models import Max
|
||||||
from django.core.cache import cache
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from orgs.mixins.models import OrgManager
|
from orgs.mixins.models import OrgManager
|
||||||
@@ -59,19 +58,17 @@ class AuthBook(BaseUser):
|
|||||||
"""
|
"""
|
||||||
username = kwargs['username']
|
username = kwargs['username']
|
||||||
asset = kwargs['asset']
|
asset = kwargs['asset']
|
||||||
key_lock = 'KEY_LOCK_CREATE_AUTH_BOOK_{}_{}'.format(username, asset.id)
|
with transaction.atomic():
|
||||||
with cache.lock(key_lock):
|
# 使用select_for_update限制并发创建相同的username、asset条目
|
||||||
with transaction.atomic():
|
instances = cls.objects.select_for_update().filter(username=username, asset=asset)
|
||||||
cls.objects.filter(
|
instances.filter(is_latest=True).update(is_latest=False)
|
||||||
username=username, asset=asset, is_latest=True
|
max_version = cls.get_max_version(username, asset)
|
||||||
).update(is_latest=False)
|
kwargs.update({
|
||||||
max_version = cls.get_max_version(username, asset)
|
'version': max_version + 1,
|
||||||
kwargs.update({
|
'is_latest': True
|
||||||
'version': max_version + 1,
|
})
|
||||||
'is_latest': True
|
obj = cls.objects.create(**kwargs)
|
||||||
})
|
return obj
|
||||||
obj = cls.objects.create(**kwargs)
|
|
||||||
return obj
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def connectivity(self):
|
def connectivity(self):
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ def test_asset_user_connectivity_util(asset_user, task_name):
|
|||||||
raw, summary = test_user_connectivity(
|
raw, summary = test_user_connectivity(
|
||||||
task_name=task_name, asset=asset_user.asset,
|
task_name=task_name, asset=asset_user.asset,
|
||||||
username=asset_user.username, password=asset_user.password,
|
username=asset_user.username, password=asset_user.password,
|
||||||
private_key=asset_user.private_key
|
private_key=asset_user.private_key_file
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn("Failed run adhoc {}, {}".format(task_name, e))
|
logger.warn("Failed run adhoc {}, {}".format(task_name, e))
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ GATHER_ASSET_USERS_TASKS = [
|
|||||||
"action": {
|
"action": {
|
||||||
"module": "shell",
|
"module": "shell",
|
||||||
"args": "users=$(getent passwd | grep -v 'nologin' | "
|
"args": "users=$(getent passwd | grep -v 'nologin' | "
|
||||||
"grep -v 'shudown' | awk -F: '{ print $1 }');for i in $users;do last -F $i -1 | "
|
"grep -v 'shudown' | awk -F: '{ print $1 }');for i in $users;do last -w -F $i -1 | "
|
||||||
"head -1 | grep -v '^$' | awk '{ print $1\"@\"$3\"@\"$5,$6,$7,$8 }';done"
|
"head -1 | grep -v '^$' | awk '{ print $1\"@\"$3\"@\"$5,$6,$7,$8 }';done"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,10 @@ def test_system_user_connectivity_util(system_user, assets, task_name):
|
|||||||
"""
|
"""
|
||||||
from ops.utils import update_or_create_ansible_task
|
from ops.utils import update_or_create_ansible_task
|
||||||
|
|
||||||
hosts = clean_ansible_task_hosts(assets, system_user=system_user)
|
# hosts = clean_ansible_task_hosts(assets, system_user=system_user)
|
||||||
|
# TODO: 这里不传递系统用户,因为clean_ansible_task_hosts会通过system_user来判断是否可以推送,
|
||||||
|
# 不符合测试可连接性逻辑, 后面需要优化此逻辑
|
||||||
|
hosts = clean_ansible_task_hosts(assets)
|
||||||
if not hosts:
|
if not hosts:
|
||||||
return {}
|
return {}
|
||||||
platform_hosts_map = {}
|
platform_hosts_map = {}
|
||||||
|
|||||||
@@ -54,12 +54,3 @@ class UserConnectionTokenApi(RootOrgViewMixin, APIView):
|
|||||||
return Response(value)
|
return Response(value)
|
||||||
else:
|
else:
|
||||||
return Response({'user': value['user']})
|
return Response({'user': value['user']})
|
||||||
|
|
||||||
def get_permissions(self):
|
|
||||||
if self.request.query_params.get('user-only', None):
|
|
||||||
self.permission_classes = (AllowAny,)
|
|
||||||
return super().get_permissions()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ User = get_user_model()
|
|||||||
|
|
||||||
|
|
||||||
class CreateUserMixin:
|
class CreateUserMixin:
|
||||||
def get_django_user(self, username, password=None):
|
def get_django_user(self, username, password=None, *args, **kwargs):
|
||||||
if isinstance(username, bytes):
|
if isinstance(username, bytes):
|
||||||
username = username.decode()
|
username = username.decode()
|
||||||
try:
|
try:
|
||||||
@@ -27,6 +27,12 @@ class CreateUserMixin:
|
|||||||
user.save()
|
user.save()
|
||||||
return user
|
return user
|
||||||
|
|
||||||
|
def authenticate(self, *args, **kwargs):
|
||||||
|
# 校验用户时,会传入public_key参数,父类authentication中不接受public_key参数,所以要pop掉
|
||||||
|
# TODO:需要优化各backend的authenticate方法,django进行调用前会检测各authenticate的参数
|
||||||
|
kwargs.pop('public_key', None)
|
||||||
|
return super().authenticate(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class RadiusBackend(CreateUserMixin, RADIUSBackend):
|
class RadiusBackend(CreateUserMixin, RADIUSBackend):
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ def send_mail_async(*args, **kwargs):
|
|||||||
"""
|
"""
|
||||||
if len(args) == 3:
|
if len(args) == 3:
|
||||||
args = list(args)
|
args = list(args)
|
||||||
args[0] = settings.EMAIL_SUBJECT_PREFIX + args[0]
|
args[0] = (settings.EMAIL_SUBJECT_PREFIX or '') + args[0]
|
||||||
email_from = settings.EMAIL_FROM or settings.EMAIL_HOST_USER
|
email_from = settings.EMAIL_FROM or settings.EMAIL_HOST_USER
|
||||||
args.insert(2, email_from)
|
args.insert(2, email_from)
|
||||||
args = tuple(args)
|
args = tuple(args)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from users.models import User
|
|||||||
from assets.models import Asset
|
from assets.models import Asset
|
||||||
from terminal.models import Session
|
from terminal.models import Session
|
||||||
from orgs.utils import current_org
|
from orgs.utils import current_org
|
||||||
from common.permissions import IsOrgAdmin
|
from common.permissions import IsOrgAdmin, IsOrgAuditor
|
||||||
from common.utils import lazyproperty
|
from common.utils import lazyproperty
|
||||||
|
|
||||||
__all__ = ['IndexApi']
|
__all__ = ['IndexApi']
|
||||||
@@ -224,7 +224,7 @@ class TotalCountMixin:
|
|||||||
|
|
||||||
|
|
||||||
class IndexApi(TotalCountMixin, WeekSessionMetricMixin, MonthLoginMetricMixin, APIView):
|
class IndexApi(TotalCountMixin, WeekSessionMetricMixin, MonthLoginMetricMixin, APIView):
|
||||||
permission_classes = (IsOrgAdmin,)
|
permission_classes = [IsOrgAdmin | IsOrgAuditor]
|
||||||
http_method_names = ['get']
|
http_method_names = ['get']
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ class Config(dict):
|
|||||||
'HTTP_BIND_HOST': '0.0.0.0',
|
'HTTP_BIND_HOST': '0.0.0.0',
|
||||||
'HTTP_LISTEN_PORT': 8080,
|
'HTTP_LISTEN_PORT': 8080,
|
||||||
'WS_LISTEN_PORT': 8070,
|
'WS_LISTEN_PORT': 8070,
|
||||||
'LOGIN_LOG_KEEP_DAYS': 90,
|
'LOGIN_LOG_KEEP_DAYS': 9999,
|
||||||
'TASK_LOG_KEEP_DAYS': 10,
|
'TASK_LOG_KEEP_DAYS': 10,
|
||||||
'ASSETS_PERM_CACHE_TIME': 3600 * 24,
|
'ASSETS_PERM_CACHE_TIME': 3600 * 24,
|
||||||
'SECURITY_MFA_VERIFY_TTL': 3600,
|
'SECURITY_MFA_VERIFY_TTL': 3600,
|
||||||
|
|||||||
@@ -15,7 +15,11 @@ class CeleryLogWebsocket(JsonWebsocketConsumer):
|
|||||||
disconnected = False
|
disconnected = False
|
||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
self.accept()
|
user = self.scope["user"]
|
||||||
|
if user.is_authenticated and user.is_org_admin:
|
||||||
|
self.accept()
|
||||||
|
else:
|
||||||
|
self.close()
|
||||||
|
|
||||||
def receive(self, text_data=None, bytes_data=None, **kwargs):
|
def receive(self, text_data=None, bytes_data=None, **kwargs):
|
||||||
data = json.loads(text_data)
|
data = json.loads(text_data)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class UserPermissionMixin:
|
|||||||
obj = None
|
obj = None
|
||||||
|
|
||||||
def initial(self, *args, **kwargs):
|
def initial(self, *args, **kwargs):
|
||||||
super().initial(*args, *kwargs)
|
super().initial(*args, **kwargs)
|
||||||
self.obj = self.get_obj()
|
self.obj = self.get_obj()
|
||||||
|
|
||||||
def get_obj(self):
|
def get_obj(self):
|
||||||
|
|||||||
@@ -53,14 +53,15 @@ class CommandQueryMixin:
|
|||||||
q = self.request.query_params
|
q = self.request.query_params
|
||||||
multi_command_storage = get_multi_command_storage()
|
multi_command_storage = get_multi_command_storage()
|
||||||
queryset = multi_command_storage.filter(
|
queryset = multi_command_storage.filter(
|
||||||
date_from=date_from, date_to=date_to, input=q.get("input"),
|
date_from=date_from, date_to=date_to,
|
||||||
user=q.get("user"), asset=q.get("asset"),
|
user=q.get("user"), asset=q.get("asset"), system_user=q.get("system_user"),
|
||||||
system_user=q.get("system_user"),
|
input=q.get("input"), session=q.get("session_id"),
|
||||||
risk_level=self.get_query_risk_level(), org_id=self.get_org_id(),
|
risk_level=self.get_query_risk_level(), org_id=self.get_org_id(),
|
||||||
)
|
)
|
||||||
return queryset
|
return queryset
|
||||||
|
|
||||||
def filter_queryset(self, queryset):
|
def filter_queryset(self, queryset):
|
||||||
|
# 解决es存储命令时,父类根据filter_fields过滤出现异常的问题,返回的queryset类型list
|
||||||
return queryset
|
return queryset
|
||||||
|
|
||||||
def get_filter_fields(self, request):
|
def get_filter_fields(self, request):
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class CommandBase(object):
|
|||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def filter(self, date_from=None, date_to=None,
|
def filter(self, date_from=None, date_to=None,
|
||||||
user=None, asset=None, system_user=None,
|
user=None, asset=None, system_user=None,
|
||||||
input=None, session=None):
|
input=None, session=None, risk_level=None, org_id=None):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
|
|||||||
2
jms
2
jms
@@ -217,7 +217,7 @@ def get_start_celery_ansible_kwargs():
|
|||||||
|
|
||||||
def get_start_celery_default_kwargs():
|
def get_start_celery_default_kwargs():
|
||||||
print("\n- Start Celery as Distributed Task Queue: Celery")
|
print("\n- Start Celery as Distributed Task Queue: Celery")
|
||||||
return get_start_worker_kwargs('celery', 2)
|
return get_start_worker_kwargs('celery', 4)
|
||||||
|
|
||||||
|
|
||||||
def get_start_worker_kwargs(queue, num):
|
def get_start_worker_kwargs(queue, num):
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ pytz==2018.3
|
|||||||
PyYAML==5.1
|
PyYAML==5.1
|
||||||
redis==2.10.6
|
redis==2.10.6
|
||||||
requests==2.22.0
|
requests==2.22.0
|
||||||
jms-storage==0.0.29
|
jms-storage==0.0.31
|
||||||
s3transfer==0.3.3
|
s3transfer==0.3.3
|
||||||
simplejson==3.13.2
|
simplejson==3.13.2
|
||||||
six==1.11.0
|
six==1.11.0
|
||||||
|
|||||||
Reference in New Issue
Block a user