Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
54c4fb4
merge dh/content_template_feature
zombified Jun 1, 2021
4026e2e
update history
zombified Jun 1, 2021
8dbc3b1
Preparing release 2.7.0
zombified Jun 1, 2021
a4d585e
Back to development: 2.7.1
zombified Jun 1, 2021
23be95d
Dh/template upgrade fix (#502)
DavidHenne Jun 7, 2021
ce0c21b
update history
zombified Jun 8, 2021
4d5c9bd
Preparing release 2.7.1
zombified Jun 8, 2021
8f08256
Back to development: 2.7.2
zombified Jun 8, 2021
1aa7a81
rebuild styles
zombified Jun 10, 2021
0c6cc78
Preparing release 2.7.2
zombified Jun 10, 2021
41d7205
Back to development: 2.7.3
zombified Jun 10, 2021
c76e301
Bd/parallax (#503)
DavidHenne Jul 5, 2021
dc19ff1
change upgrade step 2.6.35 to be 3000
zombified Jul 5, 2021
b69118c
fix upgrade step reference
zombified Jul 5, 2021
0a2d833
change upgrade step 2.6.35 to be 3000
zombified Jul 5, 2021
05c2971
pat-structure edge case loading issue fix (#507)
zombified Aug 5, 2021
be4ff7b
update changes
zombified Aug 5, 2021
31c9751
Preparing release 2.8.0
zombified Aug 5, 2021
4e331da
Back to development: 2.8.1
zombified Aug 5, 2021
5263f87
config files for widget patch and js tinymce resource addition
Aug 18, 2021
45c909b
patched widget added and wip tinymce js added to request when anonymo…
Aug 20, 2021
1f57491
Add height property to gallery tile schema (#506)
DavidHenne Sep 1, 2021
793cbbd
update changes
zombified Sep 1, 2021
ed2c4f1
Preparing release 2.9.0
zombified Sep 1, 2021
a3420d5
Back to development: 2.9.1
zombified Sep 1, 2021
4604d06
init changes
Sep 1, 2021
b9506fb
clean up code
Sep 2, 2021
05f175b
remove whitespace
bduncan137 Sep 7, 2021
320d044
keep filenames on icon and favicon
bduncan137 Sep 7, 2021
c13266d
add icon and favicon tests
bduncan137 Sep 7, 2021
6bd063c
Merge branch 'dh/rich_text_widget' into 2.x
zombified Sep 8, 2021
64d269d
update changes
zombified Sep 8, 2021
0f2d240
Preparing release 2.10.0
zombified Sep 8, 2021
7243f42
Back to development: 2.10.1
zombified Sep 8, 2021
c1684be
Merge branch 'bd/500-error-icon-favicon' into 2.x
zombified Sep 8, 2021
2e14208
update history
zombified Sep 8, 2021
25ac09c
Preparing release 2.10.1
zombified Sep 8, 2021
68859df
Back to development: 2.10.2
zombified Sep 8, 2021
3580e9e
update setup.py req pin for collective.elasticsearch to be inline wit…
zombified Sep 14, 2021
598b923
Preparing release 2.10.2
zombified Sep 14, 2021
1750811
Back to development: 2.10.3
zombified Sep 14, 2021
cfb8ed4
Revert "update to ES7 compatibility (#495)"
zombified Sep 14, 2021
ed2764f
Preparing release 2.10.3
zombified Sep 14, 2021
37e89ec
Back to development: 2.10.4
zombified Sep 14, 2021
329689f
bump plone.namedfile to 3.0.11, revert changes to Download override c…
zombified Sep 17, 2021
2d8a4a0
update history
zombified Sep 17, 2021
335e5f1
Preparing release 2.10.4
zombified Sep 17, 2021
b1c4209
Back to development: 2.10.5
zombified Sep 17, 2021
5b4bab1
icon and favicon downloads without changing functionality for other f…
bduncan137 Sep 21, 2021
7c2a8fd
flake8
bduncan137 Sep 21, 2021
fa41ca0
Merge branch 'bd/actually-fix-site-icon' into 2.x
zombified Oct 14, 2021
dd8925e
Bd/slider refactor (#514)
bduncan137 Nov 24, 2021
80c7503
Preparing release 2.11.0
zombified Nov 29, 2021
ae1bbd4
Back to development: 2.11.1
zombified Nov 29, 2021
568951c
Bd/fix widget pagination (#515)
bduncan137 Dec 2, 2021
53e7323
make sure resources are built
zombified Dec 2, 2021
579c86e
Preparing release 2.12.0
zombified Dec 2, 2021
d17536d
Back to development: 2.12.1
zombified Dec 3, 2021
e7940dd
fix to sticky footers with external urls (#518)
zombified Mar 3, 2022
0a649fe
update HISTORY
zombified Mar 3, 2022
95631bd
Preparing release 2.12.1
zombified Mar 3, 2022
d6296b3
Back to development: 2.12.2
zombified Mar 3, 2022
d0d600d
update history
zombified Mar 3, 2022
8929ff8
Preparing release 2.12.2
zombified Mar 3, 2022
7d00b88
Back to development: 2.12.3
zombified Mar 3, 2022
4b129d2
Bd/fix sticky footer (#519)
bduncan137 Mar 4, 2022
2765537
Preparing release 2.12.3
zombified Mar 4, 2022
3ca370b
Back to development: 2.12.4
zombified Mar 4, 2022
52ff126
Bd/new gallery options (#520)
bduncan137 Mar 30, 2022
a7aec97
Preparing release 2.13.0
zombified Mar 30, 2022
00b2786
Back to development: 2.13.1
zombified Mar 30, 2022
df385b9
unrestricted traverse option when creating a pdf (#521)
bduncan137 Apr 20, 2022
f740f47
Preparing release 2.14.0
zombified Apr 20, 2022
6998bfe
Back to development: 2.14.1
zombified Apr 20, 2022
ad2d9cc
Bd/import script and querylisting (#523)
bduncan137 May 6, 2022
1ac1c17
add gelf log handler and script for generating user-role-permission r…
zombified Jun 15, 2022
61e4be3
update HISTORY
zombified Jun 15, 2022
bee886e
add console script for user report
zombified Jun 15, 2022
3777279
update history
zombified May 6, 2022
4b3ceba
Preparing release 2.14.1
zombified May 6, 2022
d528d99
Back to development: 2.14.2
zombified May 6, 2022
37a927b
fixed youtube links
Jun 29, 2022
986c67c
more forgiving coordinate parsing (#531)
bduncan137 Aug 2, 2022
a024511
Preparing release 2.14.2
zombified Aug 2, 2022
a982d35
Back to development: 2.14.3
zombified Aug 2, 2022
8f9a2a4
Added .python-version file for defining a specific version of python …
daxxog Aug 22, 2022
889ecd2
Allow expired results in querylisting (#534)
bduncan137 Nov 2, 2022
49e62a2
Preparing release 2.15.0
zombified Nov 2, 2022
5e952d5
Back to development: 2.15.1
zombified Nov 2, 2022
1cf1cad
Bd/2.x prince 15 (#539)
bduncan137 Feb 1, 2023
2a59a78
Preparing release 2.16.0
zombified Feb 1, 2023
f1692b1
Back to development: 2.16.1
zombified Feb 1, 2023
5d0c76e
bump pins (#541)
bduncan137 Feb 2, 2023
ddb17dc
add site-id command-line argument to script_runner (#543)
bduncan137 Feb 15, 2023
3759601
Preparing release 2.16.1
zombified Feb 15, 2023
c939ec3
Back to development: 2.16.2
zombified Feb 15, 2023
3a8a242
Bd/2.x overlay support (#545)
bduncan137 Feb 28, 2023
475e132
Preparing release 2.17.0
zombified Feb 28, 2023
7c997f5
Back to development: 2.17.1
zombified Feb 28, 2023
4849c00
Dh/country restriction bug (#540)
DavidHenne Mar 6, 2023
dbe9864
GA4 updates for 2.x branch (#537)
DavidHenne Mar 7, 2023
7b6f205
fix upgrade zcml
zombified Mar 8, 2023
5db998b
celery updates
Mar 25, 2023
c51b6a6
more info
Mar 29, 2023
b4ee014
Merge branch 'master' into ks/celery
Mar 29, 2023
34b3aa5
merge corrections
Mar 29, 2023
c5cee78
merge corrections 2
Mar 29, 2023
acace32
merge fix 3
Mar 29, 2023
3f38a73
merge fix 4
Mar 29, 2023
026bde0
merge fix 5
Mar 29, 2023
182fe18
merge fix final
Mar 29, 2023
1d2a885
collapsible tables to hold large amts of info
Apr 10, 2023
6b5663b
Merge commit '1d2a8859' into ks/celery
Apr 10, 2023
d5e4eca
celery
Apr 17, 2023
4731e22
add sleepy task
Apr 19, 2023
3f30d9a
currently collapse function doesn't work
Apr 19, 2023
02427c8
always_eager=false
Apr 19, 2023
c83d4e3
add test task
Apr 19, 2023
696e3e2
remove debugging
Apr 19, 2023
5cc1e68
separate active and scheduled
Apr 19, 2023
59384ef
celery
Apr 25, 2023
1a20929
final changes
Apr 26, 2023
e187a62
remove test task
Mar 28, 2024
41c4ea7
update documentation with celery instructions
Mar 28, 2024
e8fcd80
defensive code if celery is not running
Mar 28, 2024
4cd07d2
plone compile
Mar 28, 2024
9b5c96a
Merge branch 'master' into ks/celery
Mar 28, 2024
43d6b46
plone compile
Mar 28, 2024
dac2772
changelog
Mar 28, 2024
460729b
Merge branch 'master' into ks/celery
Oct 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Changelog
3.0.0b134 (2024-06-06)
----------------------

- update celery control panel
- Fix mass copy/paste functionality
- Handle additional edge case errors when reindexing

Expand Down
20 changes: 13 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ Development setup on macOS
1. ``brew install redis elasticsearch libav python``
2. ``git clone git@github.com:castlecms/castle.cms.git``
3. ``cd castle.cms``
4. ``virtualenv -p python2.7 .``
5. ``bin/pip install --upgrade pip``
6. ``bin/pip install -r requirements.txt``
7. ``bin/buildout``
8. Run (in separate terminal windows) ``elasticsearch``, ``redis-server``, ``bin/instance fg``
4. ``virtualenv -p python2.7 env``
5. ``env/bin/pip install --upgrade pip``
6. ``env/bin/pip install -r requirements.txt``
7. ``env/bin/buildout``
8. Run (in separate terminal windows) ``redis-server``, ``env/bin/instance fg``
9. Browse to http://localhost:8080/

Once you have created a site in the development instance:
Expand All @@ -102,6 +102,13 @@ Once you have created a site in the development instance:
12. See the /docs/ folder for further development information


Development -- Tasks Control Panel (Celery)
-------------------------------------------
Make sure that CELERY_ALWAYS_EAGER is set to False. If set to True, tasks will be immediately handled and therefore not displayed on the task control panel.
If you are not already running an instance of redis, start one in a new terminal with `redis-server`
In a new terminal, start an instance of celery with `bin/pcelery worker parts/instance/etc/zope.conf -c 1 -E`
In your browser, navigate to the control panel on your Castle site and view the Tasks page

Optional Dependencies
---------------------

Expand All @@ -120,7 +127,7 @@ Running tests

.. code-block:: shell

./bin/test -s castle.cms
./bin/test -pvc -s castle.cms -m test_content


*To run only robot tests:*
Expand All @@ -147,7 +154,6 @@ Running local dependencies with docker

or, just the essentials:
$ docker run -p 6379:6379 redis
$ docker run -p 9200:9200 elasticsearch:2.4-alpine


Forks/Custom releases
Expand Down
70 changes: 65 additions & 5 deletions castle/cms/browser/controlpanel/ccelery.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,84 @@ def info(self):
try:
ping = ins.ping()
except Exception:
ping = ''
ping = None
try:
active = ins.active()
if active is None:
active = {}
except Exception:
active = ''
active = {}
try:
scheduled = ins.scheduled()
if scheduled is None:
scheduled = {}
except Exception:
scheduled = {}
try:
reserved = ins.reserved()
if reserved is None:
reserved = {}
except Exception:
reserved = ''
reserved = {}
try:
stats = ins.stats()
if stats is None:
stats = {}
except Exception:
stats = ''
stats = {}
try:
registered = ins.registered()
if registered is None:
registered = {}
except Exception:
registered = {}
try:
report = ins.report()
if report is None:
report = {}
for worker in report.keys():
clean_info = report[worker]['ok'].replace('\'', '').replace('\"', '').replace(' \n', '').replace('\n ', '')
while True:
alpha = len(clean_info)
clean_info = clean_info.replace(' ', ' ')
beta = len(clean_info)
if alpha>beta:
pass
else:
break
clean_info = clean_info.split('\n')
while True:
try:
index = clean_info.index('')
clean_info.pop(index)
except:
report[worker] = clean_info
break
except Exception as e:
report = {}
types = [[registered, "registered"], [reserved, "reserved"], [active, "active"], [scheduled, "scheduled"]]
counts = {}
for _type in types:
count = 0
keys = _type[0].keys()
try:
for key in keys:
if _type[1] == "stats":
count += len(_type[0][key].get('total'))
else:
count += len(_type[0][key])
counts[_type[1]]=count
except Exception:
counts[_type[1]]=0
return {
'workers': ping,
'active': active,
'scheduled': scheduled,
'reserved': reserved,
'stats': stats
'stats': stats,
'registered': registered,
'counts': counts,
'report': report,
}

def get_task_name(self, _id):
Expand Down
11 changes: 5 additions & 6 deletions castle/cms/browser/controlpanel/templates/celery.pt
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@

<metal:main metal:fill-slot="prefs_configlet_main" i18n:domain="plone">

<a
href="${context/portal_url}/@@overview-controlpanel"
id="setup-link"
>
Site Setup
<a href=""
id="setup-link"
tal:attributes="href string:$portal_url/@@overview-controlpanel"
i18n:translate="">
Site Setup
</a>

<h1 class="documentFirstHeading"
i18n:translate="">Celery Tasks</h1>

Expand Down
23 changes: 23 additions & 0 deletions castle/cms/browser/controlpanel/templates/celery_task_info.pt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
lang="en"
metal:use-macro="context/prefs_main_template/macros/master"
i18n:domain="plone">
<body>
<metal:main metal:fill-slot="prefs_configlet_main" i18n:domain="plone">
<a href=""
id="setup-link"
tal:attributes="href string:$portal_url/@@overview-controlpanel"
i18n:translate="">
Site Setup
</a>
<h1 class="documentFirstHeading" i18n:translate="">Celery Tasks</h1>
<div class="documentDescription">
Inspect currently active celery tasks
</div>
<br />
</metal:main>
</body>
</html>
19 changes: 19 additions & 0 deletions castle/cms/browser/controlpanel/templates/celery_worker.pt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
lang="en"
metal:use-macro="context/prefs_main_template/macros/master"
i18n:domain="plone">

<body>
<metal:main metal:fill-slot="prefs_configlet_main" i18n:domain="plone">
<a href=""
id="tasks-link"
tal:attributes="href string:$portal_url/@@inspect-tasks"
i18n:translate="">
Inspect Tasks
</a>
</metal:main>
</body>
</html>
2 changes: 1 addition & 1 deletion castle/cms/static/plone-compiled.css.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions castle/cms/static/plone-compiled.js
Original file line number Diff line number Diff line change
Expand Up @@ -5405,11 +5405,13 @@ define('mockup-i18n',[

var I18N = function() {
var self = this;
self.baseUrl = $('body').attr('data-i18ncatalogurl');

self['baseUrl'] = $('body').attr('data-i18ncatalogurl');

if (!self.baseUrl) {
self.baseUrl = '/plonejsi18n';
}

self.currentLanguage = $('html').attr('lang') || 'en-us';
self.storage = null;
self.catalogs = {};
Expand Down Expand Up @@ -30165,5 +30167,5 @@ $(document).ready(function(){

});

define("/Users/brian.duncan/castle-instances/pages-to-folders/castle/cms/static/plone.js", function(){});
define("/Users/katiewiessfelt/dev/git/castle/fbigov-dev/src/castle.cms/castle/cms/static/plone.js", function(){});

2 changes: 1 addition & 1 deletion castle/cms/static/plone-compiled.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion castle/cms/static/plone-compiled.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion castle/cms/static/plone-logged-in-compiled.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion castle/cms/static/plone-logged-in-compiled.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion castle/cms/static/plone-logged-in-compiled.min.js.map

Large diffs are not rendered by default.

22 changes: 0 additions & 22 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,6 @@ services:
image: "redis:alpine"
ports:
- 6379:6379
elasticsearch:
image: "elasticsearch:7.6.0"
ports:
- 9200:9200
environment:
- node.name=es01
- discovery.type=single-node
networks:
- elastic
kibana:
image: "docker.elastic.co/kibana/kibana:7.6.0"
container_name: "kibana"
ports:
- 5601:5601
environment:
ELASTICSEARCH_URL: http://elasticsearch:9200
ELASTICSEARCH_HOSTS: http://elasticsearch:9200
networks:
- elastic
etherpad:
image: "etherpad/etherpad"
ports:
Expand All @@ -33,6 +14,3 @@ services:
ports:
- 1025:1025
- 8025:8025
networks:
elastic:
driver: bridge
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cryptography==3.3.2
setuptools==44.0.0
zc.buildout==2.13.7
Pillow==6.2.2
8 changes: 4 additions & 4 deletions travis.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ develop = .

eggs +=
castle.cms[test]
celery[sqlalchemy]
celery[redis]
collective.celery
argon2_cffi
Pillow
Expand All @@ -45,16 +45,16 @@ zcml =
versions = versions

[test-environment]
CELERY_TASK_ALWAYS_EAGER = True
CELERY_TASK_ALWAYS_EAGER = False

[test]
environment = test-environment

[instance]
eggs += plone.reload
environment-vars =
BROKER_URL sqla+sqlite:///${buildout:directory}/celerydb.sqlite?timeout=30
CELERY_TASK_ALWAYS_EAGER True
BROKER_URL redis://127.0.0.1:6379/0
CELERY_TASK_ALWAYS_EAGER False
REDIS_SERVER 127.0.0.1:6379
LINK_REPORT_DB sqlite:///${buildout:directory}/linkreport.sqlite?timeout=30

Expand Down