Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cleaning-portalmec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Richard Fernando Heise Ferreira
cleaning-portalmec
Commits
1d064556
Commit
1d064556
authored
9 years ago
by
Mauricio Giacomini Girardello
Browse files
Options
Downloads
Patches
Plain Diff
small fix
parent
4060190f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/services/learning_object_publisher.rb
+6
-1
6 additions, 1 deletion
app/services/learning_object_publisher.rb
app/workers/dspace_upload_worker.rb
+1
-1
1 addition, 1 deletion
app/workers/dspace_upload_worker.rb
with
7 additions
and
2 deletions
app/services/learning_object_publisher.rb
+
6
−
1
View file @
1d064556
...
...
@@ -14,13 +14,18 @@ class LearningObjectPublisher
end
def
post
(
learning_object
,
media_path
)
DspaceUploadWorker
.
perform_async
learning_object
.
id
,
learning_object
.
id_dspace
,
media_path
DspaceUploadWorker
.
perform_async
learning_object
.
id_dspace
,
media_path
end
def
publish
(
learning_object
)
# change status
learning_object
.
status
=
'active'
learning_object_repository
.
update_property
(
learning_object
,
'status'
,
learning_object
.
status
)
# update bitstreams from attachments
#if !learning_object.attachments.nil?#
#
# end
end
private
...
...
This diff is collapsed.
Click to expand it.
app/workers/dspace_upload_worker.rb
+
1
−
1
View file @
1d064556
...
...
@@ -3,7 +3,7 @@ class DspaceUploadWorker
@@dspace
=
nil
def
perform
(
learning_object_id
,
item_id
,
media_path
)
def
perform
(
item_id
,
media_path
)
file
=
File
.
new
(
media_path
,
'r'
)
bitstream
=
dspace
.
items
.
add_bitstream
(
file
,
id:
item_id
,
name:
File
.
basename
(
media_path
),
description:
'beta upload'
)
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment